package secret

const (
	AppName = "secret"
)

type Service interface {
	RPCServer
}

func New(req *CreateSecretRequest) *Secret {
	return &Secret{
		Spec: req,
	}
}

func NewSecretSet() *SecretSet {
	return &SecretSet{
		Items: []*Secret{},
	}
}

func (s *SecretSet) Get(secretId string) *Secret {
	for i := range s.Items {
		if s.Items[i].Id == secretId {
			return s.Items[i]
		}
	}

	return nil
}
